package com.longma.server.constant.enums;


/**
 * @Author: zy
 * @Description: 告警记录状态
 * @Date: 2020/2/19
 */
public enum  AlarmRecordStateEnum implements IBaseEnum<Integer> {
    //激活
    HANDLED(0,"已处理"),

    //禁用
    UNHANDLED(1,"未处理");

    /**
     * 值
     */
    private int value;

    /*
     * 描述信息
     */
    private String desc;

    /**
     * 构造函数
     */
    AlarmRecordStateEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    /**
     * 通过值转为枚举类型
     */
    public static AlarmRecordStateEnum fromValue(int value) {
        switch (value) {
            case 0:
                return HANDLED;
            case 1:
                return UNHANDLED;
            default:
                throw new IllegalArgumentException();
        }
    }

    /**
     * 获取值
     */
    @Override
    public Integer getValue() {
        return this.value;
    }

    @Override
    public String getDesc() {
        return  this.desc;
    }

}
